Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit 9a11bfded2abb561b47387e2a9db8a7192731dcc


Parents : 2eec1d0
Author : Mark Qvist <mark@unsigned.io>
Date : 2025-11-02T02:57:51+01:00

Various UI improvements

Changes

4 files changed, 20 insertions(+), 20 deletions(-)

M sbapp/main.py +5 -1

Diff

diff --git a/sbapp/main.py b/sbapp/main.py
index 2e1c2057..dd8a6b63 100644
--- a/sbapp/main.py
+++ b/sbapp/main.py
@@ -1787,7 +1787,7 @@ class SidebandApp(MDApp):
def conversation_index_action(self, index):
if self.conversations_view != None and self.conversations_view.list != None:
i = index-1
- c = self.conversations_view.list.children
+ c = self.conversations_view.list.children[0].children
if len(c) > i:
item = c[(len(c)-1)-i]
self.conversation_action(item)
@@ -5466,6 +5466,10 @@ class SidebandApp(MDApp):
perm_ok = True
path = self.sideband.config["command_plugins_path"]
+ if not os.path.isdir(path):
+ if not RNS.vendor.platformutils.is_android(): path = os.path.expanduser("~")
+ else: path = primary_external_storage_path()
+
if perm_ok and path != None:
try:
self.file_manager = MDFileManager(

diff --git a/sbapp/sideband/core.py b/sbapp/sideband/core.py
index 7bfef1d0..05688530 100644
--- a/sbapp/sideband/core.py
+++ b/sbapp/sideband/core.py
@@ -5472,11 +5472,17 @@ class SidebandCore():
elif self.message_router.propagation_transfer_state == LXMF.LXMRouter.PR_FAILED:
return "Sync failed"
elif self.message_router.propagation_transfer_state == LXMF.LXMRouter.PR_COMPLETE:
- new_msgs = self.message_router.propagation_transfer_last_result
+ msgs_dld = self.message_router.propagation_transfer_last_result
+ duplicates = self.message_router.propagation_transfer_last_duplicates or 0
+ new_msgs = msgs_dld-duplicates
+ nms = "" if new_msgs == 1 else "s"
+ dms = "" if duplicates == 1 else "s"
if new_msgs == 0:
- return "Done, no new messages"
+ if duplicates == 0: return f"Done, no new messages"
+ else: return f"Done, no new messages\nDiscarded {duplicates} existing message{dms}"
else:
- return "Downloaded "+str(new_msgs)+" messages"
+ if duplicates == 0: return f"Downloaded {new_msgs} new message{nms}"
+ else: return f"Downloaded {new_msgs} new message{nms}\nDiscarded {duplicates} existing message{dms}"
else:
return "Unknown"

diff --git a/sbapp/ui/conversations.py b/sbapp/ui/conversations.py
index 8dd7a214..54694a21 100644
--- a/sbapp/ui/conversations.py
+++ b/sbapp/ui/conversations.py
@@ -250,7 +250,7 @@ class Conversations():
self.app = app
self.context_dests = []
self.added_item_dests = []
- # self.list = None
+ self.list = None
self.conversation_list = None
self.ids = None
@@ -268,17 +268,6 @@ class Conversations():
self.update()
- def reload(self):
- self.clear_list()
- self.update()
-
- def clear_list(self):
- if self.list != None:
- self.list.clear_widgets()
-
- self.context_dests = []
- self.added_item_dests = []
-
def update(self):
self.context_dests = self.app.sideband.list_conversations(conversations=self.app.include_conversations, objects=self.app.include_objects)
@@ -435,6 +424,7 @@ class Conversations():
RNS.log("Updating conversation list widgets", RNS.LOG_DEBUG)
if self.conversation_list == None:
self.conversation_list = ConversationList()
+ self.list = self.conversation_list
self.ids.conversation_list_container.add_widget(self.conversation_list)
self.update_conversation_list()

diff --git a/sbapp/ui/messages.py b/sbapp/ui/messages.py
index 6c547041..d945783d 100644
--- a/sbapp/ui/messages.py
+++ b/sbapp/ui/messages.py
@@ -337,15 +337,15 @@ class Messages():
if prg <= 0.00:
stamp_cost = self.app.sideband.get_lxm_stamp_cost(msg["hash"])
prop_cost = self.app.sideband.get_lxm_propagation_cost(msg["hash"])
- if stamp_cost:
+ if stamp_cost and prop_cost:
+ sphrase = f"Generating stamps with cost {stamp_cost} and {prop_cost}"
+ prgstr = ""
+ elif stamp_cost:
sphrase = f"Generating stamp with cost {stamp_cost}"
prgstr = ""
elif prop_cost:
sphrase = f"Generating propagation stamp with cost {prop_cost}"
prgstr = ""
- elif stamp_cost and prop_cost:
- sphrase = f"Generating stamps with cost {stamp_cost} and {prop_cost}"
- prgstr = ""
else:
sphrase = "Waiting for path"
elif prg <= 0.01:


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────